package dao

import (
	"219yk/inits"
	"219yk/models"
)

func GetUser(phone string) (result models.User, err error) {
	err = inits.DB.Debug().Where("phone = ?", phone).Limit(1).Find(&result).Error
	return
}

func Create(user models.User) error {
	return inits.DB.Debug().Create(&user).Error
}
